翻訳と辞書
Words near each other
・ Instruction cycle
・ Instruction in Latin
・ Instruction list
・ Instruction of Amenemope
・ Instruction of Ankhsheshonq
・ Instruction of Any
・ Instruction of Hardjedef
・ Instruction on transliteration of Belarusian geographical names with letters of Latin script
・ Instruction path length
・ Instruction pipelining
・ Instruction prefetch
・ Instruction register
・ Instruction scheduling
・ Instruction selection
・ Instruction set
Instruction set simulator
・ Instruction step
・ Instruction unit
・ Instruction window
・ Instruction-level parallelism
・ Instructional animation
・ Instructional capital
・ Instructional design
・ Instructional design coordinator
・ Instructional leadership
・ Instructional manipulation check
・ Instructional modeling
・ Instructional rounds
・ Instructional scaffolding
・ Instructional simulation


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Instruction set simulator : ウィキペディア英語版
Instruction set simulator

An instruction set simulator (ISS) is a simulation model, usually coded in a high-level programming language, which mimics the behavior of a mainframe or microprocessor by "reading" instructions and maintaining internal variables which represent the processor's registers.
Instruction simulation is a methodology employed for one of several possible reasons:
* To simulate the machine code of another hardware device or entire computer for upward compatibility—a full system simulator typically includes an instruction set simulator.
:: For example, the IBM 1401 was simulated on the later IBM/360 through use of microcode emulation.
* To monitor and execute the machine code instructions (but treated as an input stream) on the same hardware for test and debugging purposes, e.g. with memory protection (which protects against accidental or deliberate Buffer overflow).
* To improve the speed performance—compared to a slower cycle-accurate simulator—of simulations involving a processor core where the processor itself is not one of the elements being verified; in Hardware description language design using verilog where simulation with tools like ISS can be run faster by means of "PLI" (not to be confused with PL/1, which is a programming language).
== Implementation ==

An ISS is often provided with (or is itself) a debugger in order for a software engineer/programmer to debug the program prior to obtaining target hardware. GDB is one debugger which has compiled-in ISS. It is sometimes integrated with simulated peripheral circuits such as timers, interrupts, serial ports, general I/O ports, etc. to mimic the behavior of a microcontroller.
The basic instruction simulation technique is the same regardless of purpose: first execute the monitoring program passing the name of the target program as an additional input parameter.

The target program is then loaded into memory, but control is never passed to the code. Instead, the entry point within the loaded program is calculated, and a pseudo program status word (PSW) is set to this location. A set of pseudo registers are set to what they would have contained if the program had been given control directly.
It may be necessary to amend some of these to point to other pseudo "control blocks" depending on the hardware and operating system. It may also be necessary to reset the original parameter list to 'strip out' the previously added program name parameter.
Thereafter, execution proceeds as follows:
#Determine length of instruction at pseudo PSW location (initially the first instruction in the target program). If this instruction offset within program matches a set of previously given "pause" points, set "Pause" reason, go to 7.
#"Fetch" the instruction from its original location (if necessary) into the monitor's memory. If "trace" is available and "on", store program name, instruction offset and any other values.
#Depending upon instruction type, perform pre-execution checks and execute. If the instruction cannot proceed for any reason (invalid instruction, incorrect mode etc.) go to 7. If the instruction is about to alter memory, check memory destination exists (for this thread) and is sufficiently large. If OK, load appropriate pseudo registers into temporary real registers, perform equivalent move with the real registers, save address and length of altered storage if trace is "on" and go to 4. If the instruction is a "register-to-register" operation, load pseudo registers into monitors real registers, perform operation, store back to respective pseudo registers, go to 4. If the instruction is a conditional branch, determine if the condition is satisfied: if not go to 4, if condition IS satisfied, calculate branch to address, determine if valid (if not, set error = "Wild branch") and go to 7. If OK, go to 5. If instruction is an operating system call, do real call from monitorng program by "faking" addresses to return control to monitor program and then reset pseudo registers to reflect call; go to 4.
#Add instruction length to current Pseudo PSW value.
#Store next address in Pseudo PSW.
#Go to 1.
#Halt execution.
For test and debugging purposes, the monitoring program can provide facilities to view and alter registers, memory, and restart location or obtain a mini core dump or print symbolic program names with current data values. It could permit new conditional "pause" locations, remove unwanted pauses and suchlike.
Instruction simulation provides the opportunity to detect errors BEFORE execution which means that the conditions are still exactly as they were and not destroyed by the error. A very good example from the IBM S/360 world is the following instruction sequence that can cause difficulties debugging without an instruction simulation monitor.
LM R14,R12,12(R13) where r13 incorrectly points to string of X"00"s
BR R14 causes PSW to contain X"0000002" with program check "Operation Exception"

* all registers on error contain nulls.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Instruction set simulator」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.